<div class="comment_form">
<p class="title_type">New comment</p>
<%= form_remote_tag(:update => 'comments',:after => "insertWaitingImg('comments')", :url => {:controller => 'comments', :action => 'create'} ) %>
  <%= render :partial => 'form' %>
  <p><%= submit_tag "Save" %>
  <%= button_to_function 'Cancel', remote_function( :update => "comments",:after => "insertWaitingImg('comments')", :url => {:controller => 'comments', :action => 'list', :commentable_id => @commentable,:commentable_type => @commentable.class}) %>
  </p>
<%= end_form_tag %>
</div>
